Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle DESCRIBE SELECT #61

Merged
merged 4 commits into from
Sep 9, 2024
Merged

Conversation

xiaoyu-meng-mxy
Copy link
Collaborator

Based on the below sentences from the mysql doc
"The DESCRIBE and EXPLAIN statements are synonyms."
"but the MySQL parser treats them as completely synonymous."

"EXPLAIN SELECT * FROM table" is equal to "DESCRIBE SELECT * FROM table" so we should not rewrite all the DESCRIBE statement to SHOW.

@barakalon

@@ -77,6 +77,12 @@ async def query(
self.waiting.set()
await self.pause.wait()
self.waiting.clear()

if isinstance(expression, exp.Describe):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?
I'm not sure what the assert is doing below. It must be intended for the execute call.

# @pytest_asyncio.fixture
# async def query_fixture(
# mysql_connector_conn: MySQLConnection,
# mysql_connector_conn: MySQLConnectionAbstract,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer use MySQLConnection

@xiaoyu-meng-mxy xiaoyu-meng-mxy merged commit 0fdfe37 into main Sep 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants